package com.google.code.alpenglow.sample.ers.components.core;

import java.util.HashSet;
import java.util.Set;

import com.google.code.alpenglow.sample.ers.domain.Payment;
import com.google.code.alpenglow.sample.ers.domain.topay.ServiceToPay;


public class PaymentDispatcher {

	public Set<Payment> makePayments(ServiceToPay cart[]) {
		Set<Payment> payments = new HashSet<Payment>();
		for (ServiceToPay s2p : cart) {
			payments.add(makePayment(s2p));
		}
		return payments;
	}

	private Payment makePayment(ServiceToPay serviceToPay) {
		return new Payment(serviceToPay);
	}
	
}
